Optimal. Leaf size=51 \[ -\frac {2 a A \cot (c+d x)}{d}-\frac {3 a A \tanh ^{-1}(\cos (c+d x))}{2 d}-\frac {a A \cot (c+d x) \csc (c+d x)}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.06, antiderivative size = 51, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {21, 3788, 3767, 8, 4046, 3770} \[ -\frac {2 a A \cot (c+d x)}{d}-\frac {3 a A \tanh ^{-1}(\cos (c+d x))}{2 d}-\frac {a A \cot (c+d x) \csc (c+d x)}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 21
Rule 3767
Rule 3770
Rule 3788
Rule 4046
Rubi steps
\begin {align*} \int \csc (c+d x) (a+a \csc (c+d x)) (A+A \csc (c+d x)) \, dx &=\frac {A \int \csc (c+d x) (a+a \csc (c+d x))^2 \, dx}{a}\\ &=\frac {A \int \csc (c+d x) \left (a^2+a^2 \csc ^2(c+d x)\right ) \, dx}{a}+(2 a A) \int \csc ^2(c+d x) \, dx\\ &=-\frac {a A \cot (c+d x) \csc (c+d x)}{2 d}+\frac {1}{2} (3 a A) \int \csc (c+d x) \, dx-\frac {(2 a A) \operatorname {Subst}(\int 1 \, dx,x,\cot (c+d x))}{d}\\ &=-\frac {3 a A \tanh ^{-1}(\cos (c+d x))}{2 d}-\frac {2 a A \cot (c+d x)}{d}-\frac {a A \cot (c+d x) \csc (c+d x)}{2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 0.04, size = 137, normalized size = 2.69 \[ -\frac {2 a A \cot (c+d x)}{d}-\frac {a A \csc ^2\left (\frac {1}{2} (c+d x)\right )}{8 d}+\frac {a A \sec ^2\left (\frac {1}{2} (c+d x)\right )}{8 d}+\frac {a A \log \left (\sin \left (\frac {c}{2}+\frac {d x}{2}\right )\right )}{d}+\frac {a A \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )}{2 d}-\frac {a A \log \left (\cos \left (\frac {c}{2}+\frac {d x}{2}\right )\right )}{d}-\frac {a A \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.43, size = 103, normalized size = 2.02 \[ \frac {8 \, A a \cos \left (d x + c\right ) \sin \left (d x + c\right ) + 2 \, A a \cos \left (d x + c\right ) - 3 \, {\left (A a \cos \left (d x + c\right )^{2} - A a\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 3 \, {\left (A a \cos \left (d x + c\right )^{2} - A a\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right )}{4 \, {\left (d \cos \left (d x + c\right )^{2} - d\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.47, size = 93, normalized size = 1.82 \[ \frac {A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 12 \, A a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) + 8 \, A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \frac {18 \, A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 8 \, A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + A a}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}}}{8 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 1.22, size = 57, normalized size = 1.12 \[ -\frac {a A \cot \left (d x +c \right ) \csc \left (d x +c \right )}{2 d}+\frac {3 a A \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{2 d}-\frac {2 a A \cot \left (d x +c \right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.32, size = 80, normalized size = 1.57 \[ \frac {A a {\left (\frac {2 \, \cos \left (d x + c\right )}{\cos \left (d x + c\right )^{2} - 1} - \log \left (\cos \left (d x + c\right ) + 1\right ) + \log \left (\cos \left (d x + c\right ) - 1\right )\right )} - 4 \, A a \log \left (\cot \left (d x + c\right ) + \csc \left (d x + c\right )\right ) - \frac {8 \, A a}{\tan \left (d x + c\right )}}{4 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.28, size = 84, normalized size = 1.65 \[ \frac {3\,A\,a\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{2\,d}-\frac {{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (\frac {A\,a}{8}+A\,a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}+\frac {A\,a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d}+\frac {A\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ A a \left (\int \csc {\left (c + d x \right )}\, dx + \int 2 \csc ^{2}{\left (c + d x \right )}\, dx + \int \csc ^{3}{\left (c + d x \right )}\, dx\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________